<!doctype html>
<html lang="en">
<head>
    <?php echo(isset($get_header) ? $get_header : ''); ?>
	<base href="<?php echo base_url(); ?>"/>
</head>

<body class="skin-black">
<header class="header">
    <a href="<?php echo admin_url('dashboard'); ?>" class="logo"></a>
    <nav class="navbar navbar-static-top" role="navigation">
        <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

        <div class="navbar-right">
            <ul class="nav navbar-nav">
                <li><a target="_blank" href="<?php echo base_url(); ?>"><i class="fa fa-home"></i> 网站首页</a></li>
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="glyphicon glyphicon-user"></i>
                        <span><?php echo $this->user->get_name(); ?> <i class="caret"></i></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li class="user-header bg-light-blue">
                            <img src="/6x.png"
                                 class="img-circle" alt="User Image"/>

                            <p>
                                <?php echo $this->user->get_name(); ?>
                                - <?php echo $this->user->get_value('user_type_name'); ?>
                                <small>注册时间 <?php echo date('Y年m月d日', strtotime($this->user->get_value('user_created'))); ?></small>
                            </p>
                        </li>
                        <li class="user-footer">
                            <div class="pull-left">
                                <a href="<?php echo admin_url('members/edit/' . $this->user->get_value('user_seq_id')) ?>"
                                   class="btn btn-default btn-flat">设置</a>
                            </div>
                            <div class="pull-right">
                                <a href="<?php echo admin_url('logout'); ?>" class="btn btn-default btn-flat">退出</a>
                            </div>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <aside class="left-side sidebar-offcanvas">
        <?php echo(isset($get_top_header) ? $get_top_header : ''); ?>
    </aside>
    <aside class="right-side">


        <section class="content">

            <?php if ($this->session->flashdata('ERROR') || validation_errors() || !empty($error)) { ?>
                <div class="alert alert-danger alert-dismissable">
                    <i class="fa fa-ban"></i>
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">Ã—</button>
                    <b>提示!</b>
                    <?php echo $this->session->flashdata('ERROR'); ?>
                    <?php echo validation_errors(); ?>
                    <?php if (!empty($error)) { ?>
                        <?php foreach ($error as $er) { ?>
                            <?php echo $er; ?>
                        <?php } ?>
                    <?php } ?>
                </div>
            <?php } ?>
            <?php if ($this->session->flashdata('SUCCESS') || !empty($success)) { ?>
                <div class="alert alert-success alert-dismissable">
                    <i class="fa fa-check"></i>
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">Ã—</button>
                    <b>提示!</b>
                    <?php echo $this->session->flashdata('SUCCESS'); ?>
                    <?php if (!empty($success)) { ?>
                        <?php foreach ($success as $su) { ?>
                            <?php echo $su; ?>
                        <?php } ?>
                    <?php } ?>
                </div>
            <?php } ?>
            <?php if (isset($contents)) { ?>
                <?php foreach ($contents as $content) { ?>
                    <?php echo $content; ?>
                <?php } ?>
            <?php } ?>
            <?php echo(isset($get_footer) ? $get_footer : ''); ?>
        </section>
    </aside>
</div>
</body>
</html>
